<div class="projects view">
<h2><?php  __('Project');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Proj Index'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $project['Project']['proj_index']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Company'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $html->link($project['Company']['comp_name'], array('controller'=> 'companies', 'action'=>'view', $project['Company']['comp_name'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Proj Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $project['Project']['proj_name']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Edit Project', true), array('action'=>'edit', $project['Project']['proj_index'])); ?> </li>
		<li><?php echo $html->link(__('Delete Project', true), array('action'=>'delete', $project['Project']['proj_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $project['Project']['proj_index'])); ?> </li>
		<li><?php echo $html->link(__('List Projects', true), array('action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Project', true), array('action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Companies', true), array('controller'=> 'companies', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Company', true), array('controller'=> 'companies', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Phases', true), array('controller'=> 'phases', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Phase', true), array('controller'=> 'phases', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Procedures', true), array('controller'=> 'procedures', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Procedure', true), array('controller'=> 'procedures', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Requirements', true), array('controller'=> 'requirements', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Requirement', true), array('controller'=> 'requirements', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Parts', true), array('controller'=> 'parts', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Part', true), array('controller'=> 'parts', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Categories', true), array('controller'=> 'categories', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Category', true), array('controller'=> 'categories', 'action'=>'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Phases');?></h3>
	<?php if (!empty($project['Phase'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Phase Index'); ?></th>
		<th><?php __('Phase Name'); ?></th>
		<th><?php __('Phase Description'); ?></th>
		<th><?php __('Phase Project Id'); ?></th>
		<th><?php __('Phase Previous'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($project['Phase'] as $phase):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $phase['phase_index'];?></td>
			<td><?php echo $phase['phase_name'];?></td>
			<td><?php echo $phase['phase_description'];?></td>
			<td><?php echo $phase['phase_project_id'];?></td>
			<td><?php echo $phase['phase_previous'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'phases', 'action'=>'view', $phase['phase_index'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'phases', 'action'=>'edit', $phase['phase_index'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'phases', 'action'=>'delete', $phase['phase_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $phase['phase_index'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Phase', true), array('controller'=> 'phases', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Procedures');?></h3>
	<?php if (!empty($project['Procedure'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Proc Index'); ?></th>
		<th><?php __('Proc Reference'); ?></th>
		<th><?php __('Proc Title'); ?></th>
		<th><?php __('Proc Scope'); ?></th>
		<th><?php __('Proc Duration'); ?></th>
		<th><?php __('Proc Prerequisites'); ?></th>
		<th><?php __('Proc Regression'); ?></th>
		<th><?php __('Proc Ptype'); ?></th>
		<th><?php __('Proc Phase'); ?></th>
		<th><?php __('Proc Part'); ?></th>
		<th><?php __('Proc Version'); ?></th>
		<th><?php __('Proc Cat'); ?></th>
		<th><?php __('Proc Attendees'); ?></th>
		<th><?php __('Proc Remarks'); ?></th>
		<th><?php __('Proc Created By'); ?></th>
		<th><?php __('Proc Created Date'); ?></th>
		<th><?php __('Proc Updated By'); ?></th>
		<th><?php __('Proc Updated Date'); ?></th>
		<th><?php __('Proc Deleted By'); ?></th>
		<th><?php __('Proc Deleted Date'); ?></th>
		<th><?php __('Proc Project'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($project['Procedure'] as $procedure):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $procedure['proc_index'];?></td>
			<td><?php echo $procedure['proc_reference'];?></td>
			<td><?php echo $procedure['proc_title'];?></td>
			<td><?php echo $procedure['proc_scope'];?></td>
			<td><?php echo $procedure['proc_duration'];?></td>
			<td><?php echo $procedure['proc_prerequisites'];?></td>
			<td><?php echo $procedure['proc_regression'];?></td>
			<td><?php echo $procedure['proc_ptype'];?></td>
			<td><?php echo $procedure['proc_phase'];?></td>
			<td><?php echo $procedure['proc_part'];?></td>
			<td><?php echo $procedure['proc_version'];?></td>
			<td><?php echo $procedure['proc_cat'];?></td>
			<td><?php echo $procedure['proc_attendees'];?></td>
			<td><?php echo $procedure['proc_remarks'];?></td>
			<td><?php echo $procedure['proc_created_by'];?></td>
			<td><?php echo $procedure['proc_created_date'];?></td>
			<td><?php echo $procedure['proc_updated_by'];?></td>
			<td><?php echo $procedure['proc_updated_date'];?></td>
			<td><?php echo $procedure['proc_deleted_by'];?></td>
			<td><?php echo $procedure['proc_deleted_date'];?></td>
			<td><?php echo $procedure['proc_project'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'procedures', 'action'=>'view', $procedure['proc_index'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'procedures', 'action'=>'edit', $procedure['proc_index'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'procedures', 'action'=>'delete', $procedure['proc_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $procedure['proc_index'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Procedure', true), array('controller'=> 'procedures', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Requirements');?></h3>
	<?php if (!empty($project['Requirement'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('R Index'); ?></th>
		<th><?php __('R Reference'); ?></th>
		<th><?php __('R Title'); ?></th>
		<th><?php __('R Description'); ?></th>
		<th><?php __('R Category'); ?></th>
		<th><?php __('R Applicability'); ?></th>
		<th><?php __('R Conformance'); ?></th>
		<th><?php __('R Notes'); ?></th>
		<th><?php __('R Status'); ?></th>
		<th><?php __('R Project'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($project['Requirement'] as $requirement):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $requirement['r_index'];?></td>
			<td><?php echo $requirement['r_reference'];?></td>
			<td><?php echo $requirement['r_title'];?></td>
			<td><?php echo $requirement['r_description'];?></td>
			<td><?php echo $requirement['r_category'];?></td>
			<td><?php echo $requirement['r_applicability'];?></td>
			<td><?php echo $requirement['r_conformance'];?></td>
			<td><?php echo $requirement['r_notes'];?></td>
			<td><?php echo $requirement['r_status'];?></td>
			<td><?php echo $requirement['r_project'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'requirements', 'action'=>'view', $requirement['r_index'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'requirements', 'action'=>'edit', $requirement['r_index'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'requirements', 'action'=>'delete', $requirement['r_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $requirement['r_index'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Requirement', true), array('controller'=> 'requirements', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Parts');?></h3>
	<?php if (!empty($project['Part'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Part Index'); ?></th>
		<th><?php __('Part Name'); ?></th>
		<th><?php __('Part Project'); ?></th>
		<th><?php __('Part Description'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($project['Part'] as $part):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $part['part_index'];?></td>
			<td><?php echo $part['part_name'];?></td>
			<td><?php echo $part['part_project'];?></td>
			<td><?php echo $part['part_description'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'parts', 'action'=>'view', $part['part_index'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'parts', 'action'=>'edit', $part['part_index'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'parts', 'action'=>'delete', $part['part_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $part['part_index'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Part', true), array('controller'=> 'parts', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Categories');?></h3>
	<?php if (!empty($project['Category'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Cat Index'); ?></th>
		<th><?php __('Cat Name'); ?></th>
		<th><?php __('Cat Project'); ?></th>
		<th><?php __('Cat Description'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($project['Category'] as $category):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $category['cat_index'];?></td>
			<td><?php echo $category['cat_name'];?></td>
			<td><?php echo $category['cat_project'];?></td>
			<td><?php echo $category['cat_description'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'categories', 'action'=>'view', $category['cat_index'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'categories', 'action'=>'edit', $category['cat_index'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'categories', 'action'=>'delete', $category['cat_index']), null, sprintf(__('Are you sure you want to delete # %s?', true), $category['cat_index'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Category', true), array('controller'=> 'categories', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
